/* 这是ANSI文档 */

#ifndef __LIB__TIMESTAMP__H__
#define __LIB__TIMESTAMP__H__

#ifdef __cplusplus

class Lib_Timestamp
{
public:
	~Lib_Timestamp(void);

	static unsigned long long int getCurrentUpTimeNs(void);
	static unsigned long long int getCurrentUpTimeUs(void);
	static unsigned long long int getCurrentUpTimeMs(void);
	static unsigned long long int getCurrentUpTime(void);

	static unsigned long long int getCurrentDateTimeNs(void);
	static unsigned long long int getCurrentDateTimeUs(void);
	static unsigned long long int getCurrentDateTimeMs(void);
	static unsigned long long int getCurrentDateTime(void);

	static unsigned long long int getCurrentTime(void);

	static bool isCurrentDateTimeValid(void);

	static bool getLocalTime(struct tm *tmloc, unsigned long long int timestamp = 0);

	static bool getDateTimeNumber(char *buffer, int size, unsigned long long int timestamp = 0);
	static bool getDateTimeChinese(char *buffer, int size, unsigned long long int timestamp = 0);

	static const unsigned long long int timebase;
	static const unsigned long long int timebase_ms;
	static const unsigned long long int timebase_us;
	static const unsigned long long int timebase_ns;

private:
	Lib_Timestamp(void);
};

#endif

#endif
